home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / system / satan-li.1 / satan-linux.1.1.1.diff
Encoding:
Text File  |  1995-04-12  |  26.5 KB  |  795 lines

  1. diff --new-file --recursive --unified satan-1.1.1.clean/Makefile satan-1.1.1.linux/Makefile
  2. --- satan-1.1.1.clean/Makefile    Sun Apr  9 03:25:06 1995
  3. +++ satan-1.1.1.linux/Makefile    Tue Apr 11 22:39:52 1995
  4. @@ -23,12 +23,7 @@
  5.  
  6.  linux:
  7.      @echo The LINUX rules are untested and may be wrong
  8. -    @set +e; test -f include/netinet/ip.h || {\
  9. -        echo Please copy the 44BSD /usr/include/netinet include files; \
  10. -        echo files to `pwd`/include/netinet and try again.;\
  11. -        exit 1; \
  12. -    }
  13. -    @$(MAKE) all LIBS= XFLAGS="-I`pwd`/include -DAUTH_GID_T=int"
  14. +    @$(MAKE) all LIBS= XFLAGS="-DAUTH_GID_T=gid_t"
  15.  
  16.  irix4:
  17.      @$(MAKE) all LIBS="-lXm_s -lXt_s -lX11_s -lPW -lc_s -lsun" \
  18. diff --new-file --recursive --unified satan-1.1.1.clean/bin/boot.satan satan-1.1.1.linux/bin/boot.satan
  19. --- satan-1.1.1.clean/bin/boot.satan    Tue Apr 11 03:50:54 1995
  20. +++ satan-1.1.1.linux/bin/boot.satan    Tue Apr 11 22:32:04 1995
  21. @@ -1,4 +1,4 @@
  22. -#!/usr/local/bin/perl5
  23. +#!/usr/bin/perl
  24.  #
  25.  #  Execute a bootparam WHOAMI request and report the results.
  26.  #
  27. diff --new-file --recursive --unified satan-1.1.1.clean/bin/dns.satan satan-1.1.1.linux/bin/dns.satan
  28. --- satan-1.1.1.clean/bin/dns.satan    Tue Apr 11 03:50:54 1995
  29. +++ satan-1.1.1.linux/bin/dns.satan    Tue Apr 11 22:32:04 1995
  30. @@ -1,4 +1,4 @@
  31. -#!/usr/local/bin/perl5
  32. +#!/usr/bin/perl
  33.  #
  34.  #  information gatherer for dns -- uses NSLOOKUP, so you're hosed
  35.  # unless you have that...
  36. diff --new-file --recursive --unified satan-1.1.1.clean/bin/faux_fping satan-1.1.1.linux/bin/faux_fping
  37. --- satan-1.1.1.clean/bin/faux_fping    Tue Apr 11 03:50:53 1995
  38. +++ satan-1.1.1.linux/bin/faux_fping    Tue Apr 11 22:32:04 1995
  39. @@ -1,4 +1,4 @@
  40. -#!/usr/local/bin/perl5
  41. +#!/usr/bin/perl
  42.  #
  43.  # fping replacement that skips unresolvable hosts.
  44.  #
  45. diff --new-file --recursive --unified satan-1.1.1.clean/bin/finger.satan satan-1.1.1.linux/bin/finger.satan
  46. --- satan-1.1.1.clean/bin/finger.satan    Tue Apr 11 03:50:54 1995
  47. +++ satan-1.1.1.linux/bin/finger.satan    Tue Apr 11 22:32:04 1995
  48. @@ -1,4 +1,4 @@
  49. -#!/usr/local/bin/perl5
  50. +#!/usr/bin/perl
  51.  #
  52.  # version 2, Mon Mar 20 21:30:24 1995, last mod by wietse
  53.  #
  54. diff --new-file --recursive --unified satan-1.1.1.clean/bin/ftp.satan satan-1.1.1.linux/bin/ftp.satan
  55. --- satan-1.1.1.clean/bin/ftp.satan    Tue Apr 11 03:50:54 1995
  56. +++ satan-1.1.1.linux/bin/ftp.satan    Tue Apr 11 22:32:04 1995
  57. @@ -1,4 +1,4 @@
  58. -#!/usr/local/bin/perl5
  59. +#!/usr/bin/perl
  60.  
  61.  # See if the target provides anonymous ftp, non-intrusive.
  62.  
  63. diff --new-file --recursive --unified satan-1.1.1.clean/bin/get_targets satan-1.1.1.linux/bin/get_targets
  64. --- satan-1.1.1.clean/bin/get_targets    Tue Apr 11 03:50:53 1995
  65. +++ satan-1.1.1.linux/bin/get_targets    Tue Apr 11 22:32:04 1995
  66. @@ -1,4 +1,4 @@
  67. -#!/usr/local/bin/perl5
  68. +#!/usr/bin/perl
  69.  #
  70.  # Scan a subnet for live hosts
  71.  #
  72. diff --new-file --recursive --unified satan-1.1.1.clean/bin/nfs-chk.satan satan-1.1.1.linux/bin/nfs-chk.satan
  73. --- satan-1.1.1.clean/bin/nfs-chk.satan    Tue Apr 11 03:50:54 1995
  74. +++ satan-1.1.1.linux/bin/nfs-chk.satan    Tue Apr 11 22:32:04 1995
  75. @@ -1,4 +1,4 @@
  76. -#!/usr/local/bin/perl5
  77. +#!/usr/bin/perl
  78.  #
  79.  # Report file systems that are exported via portmap or that can be mounted
  80.  # by unpriviliged programs. World-mountable file systems are already taken
  81. diff --new-file --recursive --unified satan-1.1.1.clean/bin/rpc.satan satan-1.1.1.linux/bin/rpc.satan
  82. --- satan-1.1.1.clean/bin/rpc.satan    Tue Apr 11 03:50:54 1995
  83. +++ satan-1.1.1.linux/bin/rpc.satan    Tue Apr 11 22:32:04 1995
  84. @@ -1,4 +1,4 @@
  85. -#!/usr/local/bin/perl5
  86. +#!/usr/bin/perl
  87.  #
  88.  #  Does an "rpcinfo -p" on a machine, tries to determine anything interesting
  89.  # running there.
  90. diff --new-file --recursive --unified satan-1.1.1.clean/bin/rusers.satan satan-1.1.1.linux/bin/rusers.satan
  91. --- satan-1.1.1.clean/bin/rusers.satan    Tue Apr 11 03:50:54 1995
  92. +++ satan-1.1.1.linux/bin/rusers.satan    Tue Apr 11 22:32:04 1995
  93. @@ -1,4 +1,4 @@
  94. -#!/usr/local/bin/perl5
  95. +#!/usr/bin/perl
  96.  #
  97.  # version 1, Mon Mar 20 18:49:25 1995, last mod by wietse
  98.  #
  99. diff --new-file --recursive --unified satan-1.1.1.clean/bin/showmount.satan satan-1.1.1.linux/bin/showmount.satan
  100. --- satan-1.1.1.clean/bin/showmount.satan    Tue Apr 11 03:50:54 1995
  101. +++ satan-1.1.1.linux/bin/showmount.satan    Tue Apr 11 22:32:04 1995
  102. @@ -1,4 +1,4 @@
  103. -#!/usr/local/bin/perl5
  104. +#!/usr/bin/perl
  105.  #
  106.  # Find out some stuff about NFS using showmount: world-wide exports,
  107.  # boot clients.  Should not bother to do this when rpc.rip fails.
  108. diff --new-file --recursive --unified satan-1.1.1.clean/bin/tcpscan.satan satan-1.1.1.linux/bin/tcpscan.satan
  109. --- satan-1.1.1.clean/bin/tcpscan.satan    Tue Apr 11 03:50:54 1995
  110. +++ satan-1.1.1.linux/bin/tcpscan.satan    Tue Apr 11 22:32:04 1995
  111. @@ -1,4 +1,4 @@
  112. -#!/usr/local/bin/perl5
  113. +#!/usr/bin/perl
  114.  #
  115.  # version 1, Mon Mar 20 18:44:32 1995, last mod by wietse
  116.  #
  117. diff --new-file --recursive --unified satan-1.1.1.clean/bin/udpscan.satan satan-1.1.1.linux/bin/udpscan.satan
  118. --- satan-1.1.1.clean/bin/udpscan.satan    Tue Apr 11 03:50:55 1995
  119. +++ satan-1.1.1.linux/bin/udpscan.satan    Tue Apr 11 22:32:04 1995
  120. @@ -1,4 +1,4 @@
  121. -#!/usr/local/bin/perl5
  122. +#!/usr/bin/perl
  123.  #
  124.  # version 1, Mon Mar 20 18:46:18 1995, last mod by wietse
  125.  #
  126. diff --new-file --recursive --unified satan-1.1.1.clean/bin/xhost.satan satan-1.1.1.linux/bin/xhost.satan
  127. --- satan-1.1.1.clean/bin/xhost.satan    Tue Apr 11 03:50:55 1995
  128. +++ satan-1.1.1.linux/bin/xhost.satan    Tue Apr 11 22:32:04 1995
  129. @@ -1,4 +1,4 @@
  130. -#!/usr/local/bin/perl5
  131. +#!/usr/bin/perl
  132.  #
  133.  #  Query the target's X display and report whether or not it is vulnerable
  134.  # to simple X attacks (keystroke grabbing, etc.)
  135. diff --new-file --recursive --unified satan-1.1.1.clean/bin/yp-chk.satan satan-1.1.1.linux/bin/yp-chk.satan
  136. --- satan-1.1.1.clean/bin/yp-chk.satan    Tue Apr 11 03:50:55 1995
  137. +++ satan-1.1.1.linux/bin/yp-chk.satan    Tue Apr 11 22:32:04 1995
  138. @@ -1,4 +1,4 @@
  139. -#!/usr/local/bin/perl5
  140. +#!/usr/bin/perl
  141.  #
  142.  # Query the NIS server.
  143.  #
  144. diff --new-file --recursive --unified satan-1.1.1.clean/bin/ypbind.satan satan-1.1.1.linux/bin/ypbind.satan
  145. --- satan-1.1.1.clean/bin/ypbind.satan    Tue Apr 11 03:50:55 1995
  146. +++ satan-1.1.1.linux/bin/ypbind.satan    Tue Apr 11 22:32:04 1995
  147. @@ -1,4 +1,4 @@
  148. -#!/usr/local/bin/perl5
  149. +#!/usr/bin/perl
  150.  
  151.  # Try to identify a host's NIS domain name and NIS server by trying out a
  152.  # series of NIS domain name guesses. When the number of guesses becomes
  153. diff --new-file --recursive --unified satan-1.1.1.clean/config/paths.pl satan-1.1.1.linux/config/paths.pl
  154. --- satan-1.1.1.clean/config/paths.pl    Tue Apr 11 03:50:56 1995
  155. +++ satan-1.1.1.linux/config/paths.pl    Tue Apr 11 22:32:05 1995
  156. @@ -1,13 +1,13 @@
  157. -$FINGER="/usr/ucb/finger";
  158. -$FTP="/usr/ucb/ftp";
  159. -$RPCINFO="/usr/etc/rpcinfo";
  160. -$RUSERS="/usr/ucb/rusers";
  161. -$SHOWMOUNT="/usr/etc/showmount";
  162. -$YPWHICH="/bin/ypwhich";
  163. -$NSLOOKUP="/usr/etc/nslookup";
  164. +$FINGER="/usr/bin/finger";
  165. +$FTP="/bin/ftp";
  166. +$RPCINFO="/usr/sbin/rpcinfo";
  167. +$RUSERS="/usr/bin/rusers";
  168. +$SHOWMOUNT="/usr/sbin/showmount";
  169. +$YPWHICH="/usr/bin/ypwhich";
  170. +$NSLOOKUP="/usr/bin/nslookup";
  171.  $XHOST="/usr/bin/X11/xhost";
  172. -$PING="/usr/etc/ping";
  173. -$MOSAIC="/usr/exp/bin/netscape";
  174. +$PING="/bin/ping";
  175. +$MOSAIC="/usr/local/X11/bin/netscape";
  176.  
  177.  $TCP_SCAN="bin/tcp_scan";
  178.  $UDP_SCAN="bin/udp_scan";
  179. diff --new-file --recursive --unified satan-1.1.1.clean/config/paths.pl.old satan-1.1.1.linux/config/paths.pl.old
  180. --- satan-1.1.1.clean/config/paths.pl.old    Wed Dec 31 16:00:00 1969
  181. +++ satan-1.1.1.linux/config/paths.pl.old    Tue Apr 11 03:50:56 1995
  182. @@ -0,0 +1,27 @@
  183. +$FINGER="/usr/ucb/finger";
  184. +$FTP="/usr/ucb/ftp";
  185. +$RPCINFO="/usr/etc/rpcinfo";
  186. +$RUSERS="/usr/ucb/rusers";
  187. +$SHOWMOUNT="/usr/etc/showmount";
  188. +$YPWHICH="/bin/ypwhich";
  189. +$NSLOOKUP="/usr/etc/nslookup";
  190. +$XHOST="/usr/bin/X11/xhost";
  191. +$PING="/usr/etc/ping";
  192. +$MOSAIC="/usr/exp/bin/netscape";
  193. +
  194. +$TCP_SCAN="bin/tcp_scan";
  195. +$UDP_SCAN="bin/udp_scan";
  196. +$FPING="bin/fping";
  197. +$NFS_CHK="bin/nfs-chk";
  198. +$YP_CHK="bin/yp-chk";
  199. +$SAFE_FINGER="bin/safe_finger";
  200. +$MD5="bin/md5";
  201. +$SYS_SOCKET="bin/sys_socket";
  202. +$BOOT="bin/boot";
  203. +$GET_TARGETS="bin/get_targets";
  204. +$TIMEOUT="bin/timeout";
  205. +
  206. +$SATAN_CF="config/satan.cf";
  207. +$SERVICES="config/services";
  208. +
  209. +
  210. diff --new-file --recursive --unified satan-1.1.1.clean/config/paths.sh satan-1.1.1.linux/config/paths.sh
  211. --- satan-1.1.1.clean/config/paths.sh    Tue Apr 11 03:50:56 1995
  212. +++ satan-1.1.1.linux/config/paths.sh    Tue Apr 11 22:32:06 1995
  213. @@ -1,14 +1,14 @@
  214. -BASENAME=/bin/basename
  215. +BASENAME=/usr/bin/basename
  216.  CAT=/bin/cat
  217.  ECHO=/bin/echo
  218. -FILE=/bin/file
  219. +FILE=/usr/bin/file
  220.  RM=/bin/rm
  221.  RSH=/usr/ucb/rsh
  222. -SED=/bin/sed
  223. +SED=/usr/bin/sed
  224.  SU=/bin/su
  225. -TEST=/bin/test
  226. -TFTP=/usr/ucb/tftp
  227. -WHOAMI=/usr/ucb/whoami
  228. -GREP=/bin/grep
  229. +TEST=/usr/bin/test
  230. +TFTP=/usr/bin/tftp
  231. +WHOAMI=/usr/bin/whoami
  232. +GREP=/usr/bin/grep
  233.  REX=bin/rex
  234.  RCMD=bin/rcmd
  235. diff --new-file --recursive --unified satan-1.1.1.clean/config/paths.sh.old satan-1.1.1.linux/config/paths.sh.old
  236. --- satan-1.1.1.clean/config/paths.sh.old    Wed Dec 31 16:00:00 1969
  237. +++ satan-1.1.1.linux/config/paths.sh.old    Tue Apr 11 03:50:56 1995
  238. @@ -0,0 +1,14 @@
  239. +BASENAME=/bin/basename
  240. +CAT=/bin/cat
  241. +ECHO=/bin/echo
  242. +FILE=/bin/file
  243. +RM=/bin/rm
  244. +RSH=/usr/ucb/rsh
  245. +SED=/bin/sed
  246. +SU=/bin/su
  247. +TEST=/bin/test
  248. +TFTP=/usr/ucb/tftp
  249. +WHOAMI=/usr/ucb/whoami
  250. +GREP=/bin/grep
  251. +REX=bin/rex
  252. +RCMD=bin/rcmd
  253. diff --new-file --recursive --unified satan-1.1.1.clean/include/lcompat.h satan-1.1.1.linux/include/lcompat.h
  254. --- satan-1.1.1.clean/include/lcompat.h    Wed Dec 31 16:00:00 1969
  255. +++ satan-1.1.1.linux/include/lcompat.h    Tue Apr 11 22:37:20 1995
  256. @@ -0,0 +1,78 @@
  257. +struct ip {
  258. +#if defined(__i386__)
  259. +    u_char    ip_hl:4,
  260. +        ip_v:4;
  261. +#else
  262. +#error Please modify lcompat.h to support your CPU.
  263. +#endif
  264. +    u_char    ip_tos;
  265. +    short    ip_len;
  266. +    u_short    ip_id;
  267. +    short    ip_off;
  268. +#define    IP_DF 0x4000
  269. +#define    IP_MF 0x2000
  270. +#define    IP_OFFMASK 0x1fff
  271. +    u_char    ip_ttl;
  272. +    u_char    ip_p;
  273. +    u_short    ip_sum;
  274. +    struct    in_addr ip_src,ip_dst;
  275. +};
  276. +
  277. +#define ICMP_MINLEN            8
  278. +#define ICMP_UNREACH            3
  279. +#define ICMP_UNREACH_NET        0
  280. +#define ICMP_UNREACH_PROTOCOL        2
  281. +#define ICMP_UNREACH_PORT        3
  282. +#define ICMP_UNREACH_HOST        1
  283. +
  284. +struct icmp {
  285. +    u_char    icmp_type;
  286. +    u_char    icmp_code;
  287. +    u_short    icmp_cksum;
  288. +    union {
  289. +        u_char ih_pptr;
  290. +        struct in_addr ih_gwaddr;
  291. +        struct ih_idseq {
  292. +            n_short    icd_id;
  293. +            n_short    icd_seq;
  294. +        } ih_idseq;
  295. +        int ih_void;
  296. +
  297. +        struct ih_pmtu {
  298. +            n_short ipm_void;    
  299. +            n_short ipm_nextmtu;
  300. +        } ih_pmtu;
  301. +    } icmp_hun;
  302. +#define    icmp_pptr    icmp_hun.ih_pptr
  303. +#define    icmp_gwaddr    icmp_hun.ih_gwaddr
  304. +#define    icmp_id        icmp_hun.ih_idseq.icd_id
  305. +#define    icmp_seq    icmp_hun.ih_idseq.icd_seq
  306. +#define    icmp_void    icmp_hun.ih_void
  307. +#define    icmp_pmvoid    icmp_hun.ih_pmtu.ipm_void
  308. +#define    icmp_nextmtu    icmp_hun.ih_pmtu.ipm_nextmtu
  309. +    union {
  310. +        struct id_ts {
  311. +            n_time its_otime;
  312. +            n_time its_rtime;
  313. +            n_time its_ttime;
  314. +        } id_ts;
  315. +        struct id_ip  {
  316. +            struct ip idi_ip;
  317. +        } id_ip;
  318. +        u_long    id_mask;
  319. +        char    id_data[1];
  320. +    } icmp_dun;
  321. +#define    icmp_otime    icmp_dun.id_ts.its_otime
  322. +#define    icmp_rtime    icmp_dun.id_ts.its_rtime
  323. +#define    icmp_ttime    icmp_dun.id_ts.its_ttime
  324. +#define    icmp_ip        icmp_dun.id_ip.idi_ip
  325. +#define    icmp_mask    icmp_dun.id_mask
  326. +#define    icmp_data    icmp_dun.id_data
  327. +};
  328. +
  329. +struct bsd_udphdr {
  330. +    u_short    uh_sport;
  331. +    u_short    uh_dport;
  332. +    short    uh_ulen;
  333. +    u_short    uh_sum;
  334. +};
  335. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/igmp.h satan-1.1.1.linux/include/netinet/igmp.h
  336. --- satan-1.1.1.clean/include/netinet/igmp.h    Wed Dec 31 16:00:00 1969
  337. +++ satan-1.1.1.linux/include/netinet/igmp.h    Tue Apr 11 22:32:44 1995
  338. @@ -0,0 +1,24 @@
  339. +/*
  340. + *    There is more to this for better BSD compatibility than we do, but
  341. + *    its the start!
  342. + *
  343. + *    The constants etc are from smilie@poodle.mpx.com.au (Anthony Rumble)
  344. + */
  345. +
  346. +#ifndef _NETINET_IGMP_H
  347. +#define _NETINET_IGMP_H
  348. +#include <linux/igmp.h>
  349. +
  350. +struct igmp {
  351. +        unsigned char  igmp_type;      /* version & type of IGMP message  */
  352. +        unsigned char  igmp_code;      /* unused, should be zero          */
  353. +        unsigned short igmp_cksum;     /* IP-style checksum               */
  354. +        struct in_addr igmp_group;     /* group address being reported    */
  355. +};                                     /*  (zero for queries)             */
  356. +
  357. +#define IGMP_MINLEN                  8
  358. +
  359. +#define IGMP_DVMRP                     0x13    /* for experimental multicast */+                                               /*  routing protocol */
  360. +#define IGMP_MAX_HOST_REPORT_DELAY     10      /* max delay for response to */
  361. +                                               /*  query (in seconds) */
  362. +#endif 
  363. \ No newline at end of file
  364. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/in.h satan-1.1.1.linux/include/netinet/in.h
  365. --- satan-1.1.1.clean/include/netinet/in.h    Wed Dec 31 16:00:00 1969
  366. +++ satan-1.1.1.linux/include/netinet/in.h    Tue Apr 11 22:32:44 1995
  367. @@ -0,0 +1,88 @@
  368. +/* Copyright (C) 1991 Free Software Foundation, Inc.
  369. +This file is part of the GNU C Library.
  370. +
  371. +The GNU C Library is free software; you can redistribute it and/or modify
  372. +it under the terms of the GNU General Public License as published by
  373. +the Free Software Foundation; either version 1, or (at your option)
  374. +any later version.
  375. +
  376. +The GNU C Library is distributed in the hope that it will be useful,
  377. +but WITHOUT ANY WARRANTY; without even the implied warranty of
  378. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  379. +GNU General Public License for more details.
  380. +
  381. +You should have received a copy of the GNU General Public License
  382. +along with the GNU C Library; see the file COPYING.  If not, write to
  383. +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  384. +
  385. +#ifndef    _NETINET_IN_H
  386. +
  387. +#define    _NETINET_IN_H    1
  388. +#include <features.h>
  389. +
  390. +#include <sys/socket.h>
  391. +
  392. +__BEGIN_DECLS
  393. +
  394. +/* Standard well-known ports.  */
  395. +enum
  396. +  {
  397. +    IPPORT_ECHO = 7,        /* Echo service.  */
  398. +    IPPORT_DISCARD = 9,        /* Discard transmissions service.  */
  399. +    IPPORT_SYSTAT = 11,        /* System status service.  */
  400. +    IPPORT_DAYTIME = 13,    /* Time of day service.  */
  401. +    IPPORT_NETSTAT = 15,    /* Network status service.  */
  402. +    IPPORT_FTP = 21,        /* File Transfer Protocol.  */
  403. +    IPPORT_TELNET = 23,        /* Telnet protocol.  */
  404. +    IPPORT_SMTP = 25,        /* Simple Mail Transfer Protocol.  */
  405. +    IPPORT_TIMESERVER = 37,    /* Timeserver service.  */
  406. +    IPPORT_NAMESERVER = 42,    /* Domain Name Service.  */
  407. +    IPPROT_WHOIS = 43,        /* Internet Whois service.  */
  408. +    IPPORT_MTP = 57,
  409. +
  410. +    IPPORT_TFTP = 69,        /* Trivial File Transfer Protocol.  */
  411. +    IPPORT_RJE = 77,
  412. +    IPPORT_FINGER = 79,        /* Finger service.  */
  413. +    IPPORT_TTYLINK = 87,
  414. +    IPPORT_SUPDUP = 95,        /* SUPDUP protocol.  */
  415. +
  416. +
  417. +    IPPORT_EXECSERVER = 512,    /* execd service.  */
  418. +    IPPORT_LOGINSERVER = 513,    /* rlogind service.  */
  419. +    IPPORT_CMDSERVER = 514,
  420. +    IPPORT_EFSSERVER = 520,
  421. +
  422. +    /* UDP ports.  */
  423. +    IPPORT_BIFFUDP = 512,
  424. +    IPPORT_WHOSERVER = 513,
  425. +    IPPORT_ROUTESERVER = 520,
  426. +
  427. +    /* Ports less than this value are reserved for privileged processes.  */
  428. +    IPPORT_RESERVED = 1024,
  429. +
  430. +    /* Ports greater this value are reserved for (non-privileged) servers.  */
  431. +    IPPORT_USERRESERVED = 5000
  432. +  };
  433. +
  434. +
  435. +/* Link numbers.  */
  436. +#define    IMPLINK_IP        155
  437. +#define    IMPLINK_LOWEXPER    156
  438. +#define    IMPLINK_HIGHEXPER    158
  439. +
  440. +
  441. +/*
  442. + * Many other definitions have been moved to <linux/in.h>,
  443. + * because several parts of the kernel need them. -FvK
  444. + */
  445. +#include <linux/in.h>
  446. +
  447. +/*
  448. + * Bind a socket to a privileged IP port
  449. + */
  450. +extern int bindresvport __P ((int __sockfd,
  451. +        struct sockaddr_in * __sin));
  452. +
  453. +__END_DECLS
  454. +
  455. +#endif    /* netinet/in.h */
  456. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/in_system.h satan-1.1.1.linux/include/netinet/in_system.h
  457. --- satan-1.1.1.clean/include/netinet/in_system.h    Wed Dec 31 16:00:00 1969
  458. +++ satan-1.1.1.linux/include/netinet/in_system.h    Tue Apr 11 22:32:44 1995
  459. @@ -0,0 +1 @@
  460. +#include <linux/in_systm.h>
  461. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/in_systm.h satan-1.1.1.linux/include/netinet/in_systm.h
  462. --- satan-1.1.1.clean/include/netinet/in_systm.h    Wed Dec 31 16:00:00 1969
  463. +++ satan-1.1.1.linux/include/netinet/in_systm.h    Tue Apr 11 22:32:44 1995
  464. @@ -0,0 +1 @@
  465. +#include <linux/in_systm.h>
  466. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/ip.h satan-1.1.1.linux/include/netinet/ip.h
  467. --- satan-1.1.1.clean/include/netinet/ip.h    Wed Dec 31 16:00:00 1969
  468. +++ satan-1.1.1.linux/include/netinet/ip.h    Tue Apr 11 22:32:44 1995
  469. @@ -0,0 +1 @@
  470. +#include <linux/ip.h>
  471. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/ip_fw.h satan-1.1.1.linux/include/netinet/ip_fw.h
  472. --- satan-1.1.1.clean/include/netinet/ip_fw.h    Wed Dec 31 16:00:00 1969
  473. +++ satan-1.1.1.linux/include/netinet/ip_fw.h    Tue Apr 11 22:32:44 1995
  474. @@ -0,0 +1 @@
  475. +#include <linux/ip_fw.h>
  476. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/ip_icmp.h satan-1.1.1.linux/include/netinet/ip_icmp.h
  477. --- satan-1.1.1.clean/include/netinet/ip_icmp.h    Wed Dec 31 16:00:00 1969
  478. +++ satan-1.1.1.linux/include/netinet/ip_icmp.h    Tue Apr 11 22:32:44 1995
  479. @@ -0,0 +1 @@
  480. +#include <linux/icmp.h>
  481. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/ip_tcp.h satan-1.1.1.linux/include/netinet/ip_tcp.h
  482. --- satan-1.1.1.clean/include/netinet/ip_tcp.h    Wed Dec 31 16:00:00 1969
  483. +++ satan-1.1.1.linux/include/netinet/ip_tcp.h    Tue Apr 11 22:32:44 1995
  484. @@ -0,0 +1,71 @@
  485. +/*
  486. + * Copyright (c) 1982, 1986 Regents of the University of California.
  487. + * All rights reserved.
  488. + *
  489. + * Redistribution and use in source and binary forms are permitted
  490. + * provided that the above copyright notice and this paragraph are
  491. + * duplicated in all such forms and that any documentation,
  492. + * advertising materials, and other materials related to such
  493. + * distribution and use acknowledge that the software was developed
  494. + * by the University of California, Berkeley.  The name of the
  495. + * University may not be used to endorse or promote products derived
  496. + * from this software without specific prior written permission.
  497. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  498. + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  499. + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  500. + *
  501. + *    @(#)tcp.h    7.5 (Berkeley) 6/29/88
  502. + */
  503. +
  504. +#ifndef _NETINET_IP_TCP_H
  505. +#define _NETINET_IP_TCP_H
  506. +
  507. +#include <endian.h>
  508. +#include <linux/socket.h>
  509. +
  510. +typedef    u_long    tcp_seq;
  511. +/*
  512. + * TCP header.
  513. + * Per RFC 793, September, 1981.
  514. + */
  515. +struct tcphdr {
  516. +    u_short    th_sport;        /* source port */
  517. +    u_short    th_dport;        /* destination port */
  518. +    tcp_seq    th_seq;            /* sequence number */
  519. +    tcp_seq    th_ack;            /* acknowledgement number */
  520. +#if __BYTE_ORDER == __LITTLE_ENDIAN 
  521. +    u_char    th_x2:4,        /* (unused) */
  522. +        th_off:4;        /* data offset */
  523. +#endif
  524. +#if __BYTE_ORDER == __BIG_ENDIAN 
  525. +    u_char    th_off:4,        /* data offset */
  526. +        th_x2:4;        /* (unused) */
  527. +#endif
  528. +    u_char    th_flags;
  529. +#define    TH_FIN    0x01
  530. +#define    TH_SYN    0x02
  531. +#define    TH_RST    0x04
  532. +#define    TH_PUSH    0x08
  533. +#define    TH_ACK    0x10
  534. +#define    TH_URG    0x20
  535. +    u_short    th_win;            /* window */
  536. +    u_short    th_sum;            /* checksum */
  537. +    u_short    th_urp;            /* urgent pointer */
  538. +};
  539. +
  540. +#define    TCPOPT_EOL    0
  541. +#define    TCPOPT_NOP    1
  542. +#define    TCPOPT_MAXSEG    2
  543. +
  544. +/*
  545. + * Default maximum segment size for TCP.
  546. + * With an IP MSS of 576, this is 536,
  547. + * but 512 is probably more convenient.
  548. + */
  549. +#ifdef    lint
  550. +#define    TCP_MSS    536
  551. +#else
  552. +#define    TCP_MSS    MIN(512, IP_MSS - sizeof (struct tcpiphdr))
  553. +#endif
  554. +
  555. +#endif /* _NETINET_TCP_H */
  556. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/ip_udp.h satan-1.1.1.linux/include/netinet/ip_udp.h
  557. --- satan-1.1.1.clean/include/netinet/ip_udp.h    Wed Dec 31 16:00:00 1969
  558. +++ satan-1.1.1.linux/include/netinet/ip_udp.h    Tue Apr 11 22:32:44 1995
  559. @@ -0,0 +1 @@
  560. +#include <linux/udp.h>
  561. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/protocols.h satan-1.1.1.linux/include/netinet/protocols.h
  562. --- satan-1.1.1.clean/include/netinet/protocols.h    Wed Dec 31 16:00:00 1969
  563. +++ satan-1.1.1.linux/include/netinet/protocols.h    Tue Apr 11 22:32:44 1995
  564. @@ -0,0 +1,62 @@
  565. +/* protocols.h */
  566. +#ifndef _NETINET_PROTOCOLS_H
  567. +#define _NETINET_PROTOCOLS_H
  568. +
  569. +#define IP_ICMP          1
  570. +#define IP_IGMP          2
  571. +#define IP_GGP           3
  572. +#define IP_ST            5
  573. +#define IP_TCP           6
  574. +#define IP_UCL           7
  575. +#define IP_EGP           8
  576. +#define IP_IGP           9
  577. +#define IP_BBN_RCC_MON     10
  578. +#define IP_NVP_II     11
  579. +#define IP_PUP         12
  580. +#define IP_ARGUS     13
  581. +#define IP_EMCON     14
  582. +#define IP_XNET         15
  583. +#define IP_CHAOS     16
  584. +#define IP_UDP         17
  585. +#define IP_MUX         18
  586. +#define IP_DCN_MEAS     19
  587. +#define IP_HMP         20
  588. +#define IP_PRM         21
  589. +#define IP_XNS_IDP     22
  590. +#define IP_TRUNK1     23
  591. +#define IP_TRUNK2     24
  592. +#define IP_LEAF1     25
  593. +#define IP_LEAF2     26
  594. +#define IP_RDP         27
  595. +#define IP_IRTP         28
  596. +#define IP_ISO_TP4     29
  597. +#define IP_NETBLT     30
  598. +#define IP_MFE_NSP     31
  599. +#define IP_MERIT_INP     32
  600. +#define IP_SEP         33
  601. +#define IP_3PC         34
  602. +#define IP_CFTP         62
  603. +#define SAT_EXPAK     64
  604. +#define IP_RVD         66
  605. +#define IP_IPPC         67
  606. +#define IP_SAT_MON     69
  607. +#define IP_VISA         70
  608. +#define IP_IPCV         71
  609. +#define IP_BR_SAT_MON     76
  610. +#define IP_SUN_ND     77
  611. +#define IP_WB_MON     78
  612. +#define IP_WB_EXPAK     79
  613. +#define IP_ISO_IP     80
  614. +#define IP_VMTP         81
  615. +#define IP_SECURE_VMTP     82
  616. +#define IP_VINES     83
  617. +#define IP_TTP         84
  618. +#define NSFNET_IGP     85
  619. +#define IP_DGP         86
  620. +#define IP_TCF         87
  621. +#define IP_IGRP         88
  622. +#define IP_OSPFIGP     89
  623. +#define IP_SPRITE_RPG     90
  624. +#define IP_LARP         91
  625. +
  626. +#endif /*  _NETINET_PROTOCOLS_H*/
  627. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/tcp.h satan-1.1.1.linux/include/netinet/tcp.h
  628. --- satan-1.1.1.clean/include/netinet/tcp.h    Wed Dec 31 16:00:00 1969
  629. +++ satan-1.1.1.linux/include/netinet/tcp.h    Tue Apr 11 22:32:44 1995
  630. @@ -0,0 +1,71 @@
  631. +/*
  632. + * Copyright (c) 1982, 1986 Regents of the University of California.
  633. + * All rights reserved.
  634. + *
  635. + * Redistribution and use in source and binary forms are permitted
  636. + * provided that the above copyright notice and this paragraph are
  637. + * duplicated in all such forms and that any documentation,
  638. + * advertising materials, and other materials related to such
  639. + * distribution and use acknowledge that the software was developed
  640. + * by the University of California, Berkeley.  The name of the
  641. + * University may not be used to endorse or promote products derived
  642. + * from this software without specific prior written permission.
  643. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  644. + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  645. + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  646. + *
  647. + *    @(#)tcp.h    7.5 (Berkeley) 6/29/88
  648. + */
  649. +
  650. +#ifndef _NETINET_IP_TCP_H
  651. +#define _NETINET_IP_TCP_H
  652. +
  653. +#include <endian.h>
  654. +#include <linux/socket.h>
  655. +
  656. +typedef    u_long    tcp_seq;
  657. +/*
  658. + * TCP header.
  659. + * Per RFC 793, September, 1981.
  660. + */
  661. +struct tcphdr {
  662. +    u_short    th_sport;        /* source port */
  663. +    u_short    th_dport;        /* destination port */
  664. +    tcp_seq    th_seq;            /* sequence number */
  665. +    tcp_seq    th_ack;            /* acknowledgement number */
  666. +#if __BYTE_ORDER == __LITTLE_ENDIAN 
  667. +    u_char    th_x2:4,        /* (unused) */
  668. +        th_off:4;        /* data offset */
  669. +#endif
  670. +#if __BYTE_ORDER == __BIG_ENDIAN 
  671. +    u_char    th_off:4,        /* data offset */
  672. +        th_x2:4;        /* (unused) */
  673. +#endif
  674. +    u_char    th_flags;
  675. +#define    TH_FIN    0x01
  676. +#define    TH_SYN    0x02
  677. +#define    TH_RST    0x04
  678. +#define    TH_PUSH    0x08
  679. +#define    TH_ACK    0x10
  680. +#define    TH_URG    0x20
  681. +    u_short    th_win;            /* window */
  682. +    u_short    th_sum;            /* checksum */
  683. +    u_short    th_urp;            /* urgent pointer */
  684. +};
  685. +
  686. +#define    TCPOPT_EOL    0
  687. +#define    TCPOPT_NOP    1
  688. +#define    TCPOPT_MAXSEG    2
  689. +
  690. +/*
  691. + * Default maximum segment size for TCP.
  692. + * With an IP MSS of 576, this is 536,
  693. + * but 512 is probably more convenient.
  694. + */
  695. +#ifdef    lint
  696. +#define    TCP_MSS    536
  697. +#else
  698. +#define    TCP_MSS    MIN(512, IP_MSS - sizeof (struct tcpiphdr))
  699. +#endif
  700. +
  701. +#endif /* _NETINET_TCP_H */
  702. diff --new-file --recursive --unified satan-1.1.1.clean/include/netinet/udp.h satan-1.1.1.linux/include/netinet/udp.h
  703. --- satan-1.1.1.clean/include/netinet/udp.h    Wed Dec 31 16:00:00 1969
  704. +++ satan-1.1.1.linux/include/netinet/udp.h    Tue Apr 11 22:32:44 1995
  705. @@ -0,0 +1 @@
  706. +#include <linux/udp.h>
  707. diff --new-file --recursive --unified satan-1.1.1.clean/perl/html.pl satan-1.1.1.linux/perl/html.pl
  708. --- satan-1.1.1.clean/perl/html.pl    Tue Apr 11 08:33:26 1995
  709. +++ satan-1.1.1.linux/perl/html.pl    Tue Apr 11 22:32:04 1995
  710. @@ -1,4 +1,4 @@
  711. -#!/usr/local/bin/perl5
  712. +#!/usr/bin/perl
  713.  #
  714.  # version 1, Thu Mar 23 21:53:31 1995, last mod by wietse
  715.  #
  716. diff --new-file --recursive --unified satan-1.1.1.clean/reconfig satan-1.1.1.linux/reconfig
  717. --- satan-1.1.1.clean/reconfig    Sun Apr  9 06:14:08 1995
  718. +++ satan-1.1.1.linux/reconfig    Tue Apr 11 22:40:48 1995
  719. @@ -1,8 +1,4 @@
  720. -#!/bin/sh -- need to mention perl here to avoid recursion
  721. -'true' || eval 'exec perl -S $0 $argv:q';
  722. -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
  723. -& eval 'exec /usr/local/bin/perl -S $0 $argv:q'
  724. -    if 0;
  725. +#!/usr/bin/perl
  726.  
  727.  #
  728.  # version 1, Sun Mar 26 18:31:28 1995, last mod by zen
  729. diff --new-file --recursive --unified satan-1.1.1.clean/satan satan-1.1.1.linux/satan
  730. --- satan-1.1.1.clean/satan    Tue Apr 11 03:50:53 1995
  731. +++ satan-1.1.1.linux/satan    Tue Apr 11 22:32:04 1995
  732. @@ -1,4 +1,4 @@
  733. -#!/usr/local/bin/perl5
  734. +#!/usr/bin/perl
  735.  #
  736.  # version 3, Tue Apr  4  8:58:13 1995, last mod by wietse
  737.  #
  738. diff --new-file --recursive --unified satan-1.1.1.clean/src/fping/fping.c satan-1.1.1.linux/src/fping/fping.c
  739. --- satan-1.1.1.clean/src/fping/fping.c    Mon Apr  3 08:30:34 1995
  740. +++ satan-1.1.1.linux/src/fping/fping.c    Tue Apr 11 22:37:20 1995
  741. @@ -181,6 +181,8 @@
  742.  #include <sys/select.h>
  743.  #endif
  744.  
  745. +#include "../../include/lcompat.h"
  746. +
  747.  /* externals */
  748.  
  749.  extern char *optarg;
  750. diff --new-file --recursive --unified satan-1.1.1.clean/src/port_scan/tcp_scan.c satan-1.1.1.linux/src/port_scan/tcp_scan.c
  751. --- satan-1.1.1.clean/src/port_scan/tcp_scan.c    Tue Apr  4 06:33:08 1995
  752. +++ satan-1.1.1.linux/src/port_scan/tcp_scan.c    Tue Apr 11 22:37:20 1995
  753. @@ -24,6 +24,8 @@
  754.  #include <string.h>
  755.  #include <errno.h>
  756.  
  757. +#include "../../include/lcompat.h"
  758. +
  759.  extern int errno;
  760.  extern char *optarg;
  761.  extern int optind;
  762. diff --new-file --recursive --unified satan-1.1.1.clean/src/port_scan/udp_scan.c satan-1.1.1.linux/src/port_scan/udp_scan.c
  763. --- satan-1.1.1.clean/src/port_scan/udp_scan.c    Tue Apr  4 06:33:13 1995
  764. +++ satan-1.1.1.linux/src/port_scan/udp_scan.c    Tue Apr 11 22:37:20 1995
  765. @@ -20,6 +20,8 @@
  766.  #include <stdio.h>
  767.  #include <string.h>
  768.  
  769. +#include "../../include/lcompat.h"
  770. +
  771.  extern int errno;
  772.  
  773.  #ifndef __STDC__
  774. @@ -353,7 +355,7 @@
  775.      int     hdr_len;
  776.      struct ip *ip;
  777.      struct icmp *icmp;
  778. -    struct udphdr *udp;
  779. +    struct bsd_udphdr *udp;
  780.      struct port_info *sp;
  781.  
  782.      if ((data_len = recv(sock, (char *) &buf, sizeof(buf), 0)) < 0) {
  783. @@ -401,9 +403,9 @@
  784.       * Extract the offending UDP header.
  785.       */
  786.      hdr_len = ip->ip_hl << 2;
  787. -    udp = (struct udphdr *) ((char *) ip + hdr_len);
  788. +    udp = (struct bsd_udphdr *) ((char *) ip + hdr_len);
  789.      data_len -= hdr_len;
  790. -    if (data_len < sizeof(struct udphdr)) {
  791. +    if (data_len < sizeof(struct bsd_udphdr)) {
  792.      remark("short UDP header in ICMP");
  793.      return;
  794.      }
  795.